<template>
  <cml-module-item
    :title="titleText"
    :titleMore="titleText">
    <a-switch size="small" :checked="isDragOpen" @change="changeDragOpen" />
    <template v-slot:detail>
        <drag-opt></drag-opt>
      </template>
  </cml-module-item>
</template>
<script>
import { Switch } from 'ant-design-vue'
import CmlModuleItem from '../cml-module-item'
import DragOpt from './dragOpt'
import { mapState, mapMutations } from 'vuex'

export default {
  name: 'customLayout',
  components: {
    ASwitch: Switch,
    CmlModuleItem,
    DragOpt
  },
  model: {},
  props: {},
  data() {
    return {}
  },
  computed: {
    ...mapState('partServer', ['isDragOpen']),
    titleText() {
     return this.$t('cmlpanel.customLayout')
    }
  },
  created() {},
  mounted() {},
  beforeDestroy() {},
  methods: {
    ...mapMutations('partServer', ['setIsDragOpen']),
    changeDragOpen() {
     this.setIsDragOpen(!this.isDragOpen)
    }
  }
}
</script>
<style lang="scss" scoped></style>
